{% extends "base.html" %}
{% block title %}
    问答详情
{% endblock %}
{% block head %}

{% endblock %}
{% block body %}
    <form method="post">
        <input name="title" value="{{ question.title }}" placeholder="输入标题"/><br/>
        <textarea name="content" cols="30" rows="10">{{ question.content }}</textarea><br/>
        <span>作者：{{ question.author.username }}</span><br/>
        <span>发布时间：{{ question.create_time }}</span>
        <input type="submit" value="发布"/>
    </form>
    <form action="/qa/answer/{{ question.id }}" method="post">
        <input name="content"/>
        <input type="submit" value="发布回答"/>
        <span>（{{ question.answers|length }}）</span>
    </form>
    <div>
        <ul>
            {% for answer in question.answers %}
                <li>
                    {{ answer.content }}--{{ answer.author.username }}--{{ answer.create_time }}
                </li>
            {% endfor %}
        </ul>
    </div>
{% endblock %}